const Mock = require('mockjs')

const data = Mock.mock({
  'items|10': [{
    'referId|+1': 0,
    title: '@title(5)',
    'status|1': ['published', 'draft', 'deleted'],
    author: 'name',
    'app|1': ['采编发系统', '麻雀分发平台'],
    summary: '简介简介',
    pvTotal: '100',
    cmtCount: '100',
    agreeCount: '100',
    shareCount: '100',
    weight: '1',
    keywords: ['关键词1', '关键词2', '关键词3'],
    publishDate: '@datetime',
    updateDate: '@datetime'
  }]
})

module.exports = [
  {
    url: '/vue-admin-template/table/list',
    type: 'get',
    response: config => {
      const items = data.items
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
